package com.fzhucc.modules.security.config;

import com.alibaba.nacos.api.config.annotation.NacosValue;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * @author KQiang Weng
 * @since 2022/09/13 11:50
 */
@Data
@ConfigurationProperties(prefix = "wx")
@Configuration
public class WxProperties {

    /**
     * 小程序应用
     */
    private Info mp;

    /**
     * 网站应用
     */
    private Info h5;

    /**
     * 默认值"release"。要打开的小程序版本。正式版为"release"，体验版为"trial"，开发版为"develop"，仅在微信外打开时生效。
     */
    @NacosValue(value = "${wx.env:release}", autoRefreshed = true)
    private String env;

    @Data
    public static class Info {
        private String appId;
        private String appSecret;
    }
}
